﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Negocios;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Testes
{
    [TestClass]
    public class EpisodioTeste
    {

        private TestContext testContextInstance;

        public TestContext TestContextInstance
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }

        }
        [TestMethod]
        [ExpectedException(typeof(BOException))]
        public void InsereNomeVazio()
        {
            EpisodioBO eBO = new EpisodioBO();
            eBO.Nome = "";
        }

        [TestMethod]
        [ExpectedException(typeof(BOException))]
        public void InsereNomeMaiorQue50Caracteres()
        {
            EpisodioBO eBO = new EpisodioBO();
            eBO.Nome = "qwerrtydyuiryuiuioyuiouiopypoiypoiykljfhlkhskjhdfoiu";
        }

        [TestMethod]
        [ExpectedException(typeof(BOException))]
        public void testeSinopseVazio()
        {
            EpisodioBO eBO = new EpisodioBO();
            eBO.Sinopse = "";

        }

        [TestMethod]
        [ExpectedException(typeof(BOException))]
        public void testeSinopseMaiorQue200()
        {
            EpisodioBO eBO = new EpisodioBO();
            eBO.Sinopse = "qwerrtydyuiryuiuioyuiouiopypoiypoiykljfhlkhskjhdfoiuqwerrtydyuiryuiuioyuiouiopypoiypoiykljfhlkhskjhdfoiuqwerrtydyuiryuiuioyuiouiopypoiypoiykljfhlkhskjhdfoiuqwerrtydyuiryuiuioyuiouiopypoiypoiykljfhlkhskjhdfoiu";

        }

        [TestMethod]
        [ExpectedException(typeof(BOException))]
        public void testepreco0()
        {
            EpisodioBO eBO = new EpisodioBO();
            eBO.Payperview = true;
            eBO.Preco = 0;
        }

        [TestMethod]
        [ExpectedException(typeof(BOException))]
        public void testetempo()
        {
            EpisodioBO eBO = new EpisodioBO();
            eBO.Tempo = new DateTime();
        }
    }
}
